<?php

namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;

class MenuController extends CommonController{
    public $perpage = 1000;
    protected $Menu;

    public function index(Request $request)
    {
        $Menu = new $this->Menu();

        $list = $Menu->getMenus();

        if ($request->ajax() || (isset($_REQUEST['_async']) && 1 == $_REQUEST['_async'])) {
            return $this->output(0, '', $list);
        } else {
            $this->assign('list', $list);
            // print_r($li)
            return $this->fetch();
        }
    }
}